package com.xiyou.luckdraw.api.dto.user;

import com.xiyou.luckdraw.common.result.AbstractRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @ClassName: ExchangeListRequest
 * @Description:
 * @author: limingxing
 * @Date: 2019-10-10 17:07
 */
@Data
@ApiModel(value = "用户兑换记录列表请求")
public class ExchangeListRequest extends AbstractRequest {
    private Long userId;
    @ApiModelProperty(value = "昵称")
    private String nickName;
    private Integer status;
    @ApiModelProperty(value = "开始时间")
    private String startTime;
    @ApiModelProperty(value = "结束时间")
    private String endTime;
    @ApiModelProperty(value = "页码",example = "1")
    private Integer page;
    @ApiModelProperty(value = "页大小",example = "10")
    private Integer size;

    @Override
    public void requestCheck() {
        if(page == null || page < 1){
            page = 1;
        }
        if(size == null || size < 1){
            size = 10;
        }
    }
}
